public class Project111 {
     public static void main(String[] args) {
        //查询mysql中所有的表
         //select table_name from information_schema.tables where table_schema='dd_db'
        //把所有表用逗号隔开
         String tables="base_email_log,base_request_log,base_sms_log,base_thirdpartyapi_log,product_activity,product_aftersales,product_category,product_detail,product_images,product_order,product_ordergoods,sys_authority,sys_company,sys_email_template,sys_enum,sys_menu,sys_menu_auth,sys_menucatalog,sys_objectsort,sys_paramconfig,sys_post,sys_post_role,sys_role,sys_role_auth,sys_sms_template,sys_user,sys_user_company,sys_user_post,sys_userrole,user_bankcard,user_id,user_idcard,user_idupdate,user_info,user_shippingaddress,user_wallet,user_walletrecord,user_withdrawalrecord";
         for (int i = 0; i < tables.split(",").length; i++) {
             String tabele=tables.split(",")[i];
             System.out.println("<table  tableName=\""+tabele+"\" mapperName=\""+formatStr(tabele)+"DAO\"   domainObjectName=\""+formatStr(tabele)+"PO\"  enableCountByExample=\"true\" enableUpdateByExample=\"true\" enableDeleteByExample=\"true\" enableSelectByExample=\"true\" selectByExampleQueryId=\"true\">  <property name=\"useActualColumnNames\" value=\"true\"/> </table>");
         }
         //把控制台打印出来的内容复制到generatorConfig.xml,然后点击右边的
    }
    public static String formatStr(String tab){
         String aa=null;
        for (int i = 0; i < tab.split("_").length; i++) {
            if(i==0){
                aa=tab.split("_")[0];
            }else{
                String str=tab.split("_")[i];
                str= str.substring(0,1).toUpperCase()+str.substring(1);
                aa=aa+str;
            }
        }
         return aa;
    }


}
